package base;

import java.util.LinkedList;

/**
 * Gather all {@link Server}
 * 
 * @author rweiller
 * 
 */
public abstract class ServerAdministrator
{
	public LinkedList<Server>	server_list;
	public Server				next_srv;

	public ServerAdministrator(int nb_server, int process_power, int latency)
	{
		if (nb_server < 1 || process_power < 1 || latency > 0)
		{
			throw new IllegalArgumentException("Server paramaters should be higher than 0, see config file.");
		}

		server_list = new LinkedList<Server>();
		for (int i = 0; i < nb_server; i++)
		{
			server_list.add(new Server(process_power, latency));
		}
	}

	public abstract void distribute(Element el);
}
